package ooday01homework;

public class Student {
    /*
    String name;
    int age;
    String className;
    String stuId;

    Student() {

    }

    Student(String name, int age, String className, String stuId) {
        this.age=age;
        this.stuId=stuId;
        this.className=className;
        this.name=name;
    }

    void sayHi() {
        System.out.println("名字是："+name);
    }

    void playWith(String anotherName) {
        System.out.println(name+"在和"+anotherName+"一起玩");
    }

    void study() {
        System.out.println("名字是："+name+"，年龄是："+age+"岁，班级是："
        +className+"，学号是："+stuId+"在学习");
    }

     */
    String name ;
    int age;
    String className;
    String stuId;

    Student() {


    }

    Student(String name, int age, String className, String stuId) {
        this.name = name;
        this.stuId=stuId;
        this.className=className;
        this.age=age;
    }

    void study() {
        System.out.println(name+"在学习");
    }

    void sayHi() {
        System.out.println("你好" + name);
    }

    void playWith(String other) {
        System.out.println("名字："+name+"年龄："+age+"班级："
                +"学生id："+stuId+"别人是："+other);
    }
}
